home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_16854.txt < prev    next >
Text File  |  1991-02-27  |  881b  |  27 lines

  1. -- card: 16854 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. Again, you can copy this program from the scrolling text field and paste it into a new TC source file.  Sample output is shown below, with the user's responses in <> braces.
  11.  
  12.     Enter student id number:
  13.     <45>
  14.     Enter age and weight separated by spaces:
  15.     <12  67>
  16.     My id number is 45
  17.     My age is 12
  18.     My weight is 67
  19.  
  20. (A few bugs will occur if C++ is used in place of TC.  These differences are discussed in Chapter 4 and summarized in Appendix 2.  Chapter 7 describes how to write TC programs which will compile equally well under C++.)
  21.  
  22. Notice that the only change to the main() function is that the person variable now points to a Student object.
  23.  
  24.  
  25. -- part contents for background part 7
  26. ----- text -----
  27. 41